package com.accp.controller;


import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.accp.entity.TzSku;
import com.accp.service.ITzSkuService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;

/**
 * <p>
 * 单品SKU表 前端控制器
 * </p>
 *
 * @author 辉
 * @since 2019-12-26
 */
@RestController
@RequestMapping("/accp/tzSku")
public class TzSkuController {

	@Autowired
	private ITzSkuService itzSkuService;
	
	/**
	 *  商品详情
	 * @param prodId 商品ID
	 * @return 商品集合
	 */
	@RequestMapping("tzSkuList")
	public List<TzSku> tzSkuList(Integer prodId){		
		QueryWrapper<TzSku> qw = new QueryWrapper<>();
		if(prodId!=null&&prodId!=0) {
			qw.eq("prod_id", prodId);
		}
		return itzSkuService.list(qw);
	}
	
	
	
}

